//
//  HDBrowserHelper.h
//  leek-web_Example
//
//  Created by 吴非 on 2022/1/12.
//  Copyright © 2022 懒虫. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HDBrowserCompleteDelegate.h"

NS_ASSUME_NONNULL_BEGIN

@interface HDBrowserHelper : NSObject

// 单例
+ (instancetype)defaultService;

/// 分享授权回调
@property (nonatomic, weak, nullable) id <HDBrowserCompleteDelegate> delegate;

/// 授权域名
+(void)renderDomain:(NSString*)tmpURL;
/// 配置微信
+(void)renderWeixin:(NSString*)tmpURL;
/// 配置微信#关键词拼接
+(void)renderWeixinKeywords:(NSString*)kwd;
/// 配置支付宝
+(void)renderAlipay:(NSString*)tmpURL;
/// 重定向地址
+(void)redirectURL:(NSString*)tmpURL;
/// 回调处理
+ (BOOL)handleOpenURL:(NSURL *)tmpURL;



/// 获取授权域名
-(NSString*)currentDomainURL;
/// 获取微信地址
-(NSString*)currentWeixinURL;
/// 获取支付宝地址
-(NSString*)currentAlipayURL;


/// 解析支付宝返回重定向地址
+(NSString* )analysisAlipayURL:(NSString*)absoluteUrl;

/// 解析微信返回重定向地址
+(NSString* )analysisWeixinURL:(NSString*)absoluteUrl;


/// 检查重定向地址
+(BOOL)checkRedirectURL:(NSString*)rURL;


/// 清理缓存
+(void)removeCache;

@end

NS_ASSUME_NONNULL_END
